using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace BanHangCshap.Report.gkhtdl63.MyRPT
{
    public partial class XtraReport1 : DevExpress.XtraReports.UI.XtraReport
    {
        public XtraReport1()
        {
            InitializeComponent();
        }

        private void xrRichText1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
        //    xrRichText1.Styles.Style.ResetTextAlignment();
        //    xrRichText1.Styles.Style.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
        }

        private void xrRichTextBox1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
           // XRRichTextBox.tex
        }

        private void xrLabel1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            l1.Text = "sfsdf\nsdfdsf\nwesdfs\n";
        }

        private void l1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            int y = 0;
            for (int i = 0; i < 4; i++)
            {
                DevExpress.XtraReports.UI.XRLabel ll = new XRLabel();
                y = y + 25;

                this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.ll});

                this.ll.Location = new System.Drawing.Point(408, y);
                this.ll.Name = "l"+(i+3).ToString();
                this.ll.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
                this.ll.Size = new System.Drawing.Size(100, 25);
                this.ll.Text = "l1";
            }
        }

    }
}
